<div class="page-content" >
	<div class="panel panel-default">
		<div class="panel-heading">
			<ul class="breadcrumb">
			
				<li><a   href="<{:U('log_template'))}>">模板列表</a> </li>
				<li class="active">添加</li>
			</ul>
		</div>
		<div class="panel-body">
			<form id="myform" enctype="multipart/form-data"  method="post" class="form-horizontal" action="<{:U('add_log_template')}>">
				<input type="hidden" name="id" value="<{$data.id}>">
				 
				<div class="form-group">
					<label for="input-title"  class="col-sm-1 control-label">标题</label>
					<div class="col-sm-10">
						<input  type="text" class="form-control" id="title" name="title" value="<{$data.title}>">
					</div>
				</div>
				<div class="form-group">
					<label for="input-title"  class="col-sm-1 control-label">事件名称</label>
					<div class="col-sm-10">
						<input  type="text" class="form-control"  name="event" value="<{$data.event}>">
					</div>
				</div>
				
					<div class="form-group">
					<label for="input-title"  class="col-sm-1 control-label">是否公开显示</label>
					<div class="col-sm-10">
						<{:form_radio(array('1'=>'公开','0'=>'私有',$data['public']))}>
					</div>
				</div>
				
				<div class="form-group">
					<label for="input-title"  class="col-sm-1 control-label">类型</label>
					<div class="col-sm-10">
						<select name="type" class="form-control">
						<volist name="log_type" id="vo">
						<option selected="selected" value="<{$key}>"><{$vo}></option>
						</volist>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="input-title"  class="col-sm-1 control-label">模板内容</label>
					<div class="col-sm-10">
						<textarea class="form-control"  name="content"><{$data.content}></textarea>
					</div>
				</div>
				 
				 
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<button type="submit" class="btn btn-primary">保存</button>
						</div>
				</div>
			</form>
		</div>
	</div>
</div>
<script>
 
$(function(){
    $(".form-horizontal").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
            title: {
                message: '名称',
                validators: {
                    notEmpty: {
                        message: '名称为空'
                    },
                }
            },
			
			 event: {
                message: '事件名称',
                validators: {
                    notEmpty: {
                        message: '事件不能为空'
                    },
                }
            },
			
			 content: {
                message: '模板内容',
                validators: {
                    notEmpty: {
                        message: '模板内容不为空'
                    },
                }
            },
			
			 
			
        }
    });
	
 
});
 </script> 